<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTablePaylog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('paylog', function(Blueprint $table)
        {
            $table->increments('id')->comment('自增长');
            $table->string('order')->comment('订单号');
            $table->string('token')->nullable()->comment('支付唯一标识');
            $table->string('class')->comment('支付类型 1充值 2消费');
            $table->string('uid')->comment('用户ID 收入方');
            $table->string('fid')->nullable()->comment('用户ID 付出方');
            $table->string('price')->comment('金额');
            $table->string('type')->comment('支付方式 支付宝  微信');
            $table->tinyInteger('status')->defualt(0)->comment('支付状态 0未通过 1通过');
            $table->unsignedInteger('create_time')->comment('创建时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('paylog');
    }
}
